//
// CShapeBankUser.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

public class CShapeBankUser {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CShapeBankUser(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CShapeBankUser obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CShapeBankUser(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public void addShapeCache(String shapeCacheName) {
    nel3dJNI.CShapeBankUser_addShapeCache(swigCPtr, this, shapeCacheName);
  }

  public void removeShapeCache(String shapeCacheName) {
    nel3dJNI.CShapeBankUser_removeShapeCache(swigCPtr, this, shapeCacheName);
  }

  public void reset() {
    nel3dJNI.CShapeBankUser_reset(swigCPtr, this);
  }

  public void setShapeCacheSize(String shapeCacheName, int maxSize) {
    nel3dJNI.CShapeBankUser_setShapeCacheSize(swigCPtr, this, shapeCacheName, maxSize);
  }

  public void linkShapeToShapeCache(String shapeName, String shapeCacheName) {
    nel3dJNI.CShapeBankUser_linkShapeToShapeCache(swigCPtr, this, shapeName, shapeCacheName);
  }

  public void preLoadShapesFromDirectory(String shapeCacheName, String path, String wildCard, boolean recurs, SWIGTYPE_p_NLMISC__IProgressCallback progress, boolean flushTextures) {
    nel3dJNI.CShapeBankUser_preLoadShapesFromDirectory__SWIG_0(swigCPtr, this, shapeCacheName, path, wildCard, recurs, SWIGTYPE_p_NLMISC__IProgressCallback.getCPtr(progress), flushTextures);
  }

  public void preLoadShapesFromDirectory(String shapeCacheName, String path, String wildCard, boolean recurs, SWIGTYPE_p_NLMISC__IProgressCallback progress) {
    nel3dJNI.CShapeBankUser_preLoadShapesFromDirectory__SWIG_1(swigCPtr, this, shapeCacheName, path, wildCard, recurs, SWIGTYPE_p_NLMISC__IProgressCallback.getCPtr(progress));
  }

  public void preLoadShapesFromDirectory(String shapeCacheName, String path, String wildCard, boolean recurs) {
    nel3dJNI.CShapeBankUser_preLoadShapesFromDirectory__SWIG_2(swigCPtr, this, shapeCacheName, path, wildCard, recurs);
  }

  public void preLoadShapesFromBNP(String shapeCacheName, String bnpName, String wildCard, SWIGTYPE_p_NLMISC__IProgressCallback progress, boolean flushTextures) {
    nel3dJNI.CShapeBankUser_preLoadShapesFromBNP__SWIG_0(swigCPtr, this, shapeCacheName, bnpName, wildCard, SWIGTYPE_p_NLMISC__IProgressCallback.getCPtr(progress), flushTextures);
  }

  public void preLoadShapesFromBNP(String shapeCacheName, String bnpName, String wildCard, SWIGTYPE_p_NLMISC__IProgressCallback progress) {
    nel3dJNI.CShapeBankUser_preLoadShapesFromBNP__SWIG_1(swigCPtr, this, shapeCacheName, bnpName, wildCard, SWIGTYPE_p_NLMISC__IProgressCallback.getCPtr(progress));
  }

  public void preLoadShapesFromBNP(String shapeCacheName, String bnpName, String wildCard) {
    nel3dJNI.CShapeBankUser_preLoadShapesFromBNP__SWIG_2(swigCPtr, this, shapeCacheName, bnpName, wildCard);
  }

  public UShape getShape(String shapeName) {
    return new UShape(nel3dJNI.CShapeBankUser_getShape(swigCPtr, this, shapeName), true);
  }

  public void buildSystemGeometryForshape(String shapeName) {
    nel3dJNI.CShapeBankUser_buildSystemGeometryForshape(swigCPtr, this, shapeName);
  }

  public void set_ShapeBank(CShapeBank value) {
    nel3dJNI.CShapeBankUser__ShapeBank_set(swigCPtr, this, CShapeBank.getCPtr(value), value);
  }

  public CShapeBank get_ShapeBank() {
    long cPtr = nel3dJNI.CShapeBankUser__ShapeBank_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CShapeBank(cPtr, false);
  }

  public void set_DriverUser(CDriverUser value) {
    nel3dJNI.CShapeBankUser__DriverUser_set(swigCPtr, this, CDriverUser.getCPtr(value), value);
  }

  public CDriverUser get_DriverUser() {
    long cPtr = nel3dJNI.CShapeBankUser__DriverUser_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CDriverUser(cPtr, false);
  }

  public CShapeBankUser() {
    this(nel3dJNI.new_CShapeBankUser(), true);
  }

}
